import {ADD,INC} from '../actions/counter';

function counter(state = 0, action) {
  switch (action.type) {
  case ADD:
    return state + 1;
  case INC:
    return state - 1;
  default:
    return state;
  }
}

module.exports = counter